The general need for measuring phase differences between two signals is very old, in particular within the telecommunication area. The problem is usually solved by means of a phase comparator, for example included in a phase-locked loop or PLL. Such a circuit normally comprises a phase comparator PD having input terminals connected to receive the signals the phase of which is to be compared, a loop filter PI, a voltage controlled oscillator VCO and a divider circuit N.sub.D, see FIG. 1. The loop filter is often of PI-type, that is it comprises both a proportional part (P) and an integrating part (I). Prior phase comparators were almost always analog or "semianalog". These phase comparators provide as an output signal an analog voltage proportional to the phase difference. A very common type of a semianalog phase comparator is the sawtooth comparator. It comprises an SR-flip-flop triggered at edges of the incoming signals and a low-pass filter. An edge of one of the incoming signals sets the flip-flop in a one position and an edge of the other signal resets the flip-flop. The output square wave is low-pass filtered in for example a simple RC-circuit. The phase position becomes proportional to the output voltage within the phase difference of 0-2.pi.. As regarded over a larger phase interval, the relation between the output voltage and the input phase will have the configuration of a sawtooth, from which the name is derived. A phase-locked circuit having a sawtooth comparator is described in the article "Properties and design of the Phase-controlled oscillator with a sawtooth comparator", Byrne, C. J., (1962), The Bell System Technical Journal, page 599.
Nowadays phase comparators which are constructed entirely of digital circuits are used more and more often. A digital phase comparator provides as an output signal a digital numerical value which is proportional to the phase difference, the digital value being for example an 8-bit word. There exist several reasons for using digital phase comparators. Since phase-locked circuits have very small band widths (&lt;1 Hz), it is difficult or impossible to use analog filters for performing a signal processing which may often be required before the signal is provided to the voltage controlled oscillator VCO. The problem can be solved by providing an AD-converter connected to the output terminal of the analog phase comparator but this solution may be costly, space consuming and sensitive to interference. In a telephone station, also a PLL can be geometrically or geographically distributed; for instance the VCO can be located on one board, the loop filter in a microprocessor on another board and the phase comparator on a third board. In such a distributed PLL of course the signals have to be communicated digitally.
There are several ways of constructing digital phase comparators but a common, prior digital phase comparator, see FIG. 2, comprises an oscillator, or is in any case connected for receiving an available high frequency clock signal, and comprises further a counter. The oscillator is coupled to the counter. Definite edges of the input signals, the phases of which are to be compared, are used, and the edge of one of the signals starts the counter and the edge of the other signal stops the counter. When the counter is stopped, the digital numerical value stored therein constitutes an estimate of the phase difference. Before the next start of the counter it is reset. The loop filter in a PLL requires a numerical value typically 1 to 10 times per second and the input signals to the phase comparator then have significantly higher frequencies, for instance 64 kHz. Then the PLL can command a phase measurement at the time when the loop filter needs a numerical value or the phase comparator can also measure the phase in the same rate as the input frequency, for example at 64 kHz, and the loop filter circuit then takes the last measured value at the time when a value is required.
Digital phase comparators are e.g. disclosed in U.S. Pat. No. 4,972,160 and the published European patent application EP-A2 0 585 806.